package com.haiya.factory.absfactory.farm.factory;

import com.haiya.factory.absfactory.farm.product.Animal;
import com.haiya.factory.absfactory.farm.product.Fruite;
import com.haiya.factory.absfactory.farm.product.Horse;
import com.haiya.factory.absfactory.farm.product.Plant;

public class GmFarm implements Farm {
    @Override
    public Animal newAnimal() {
        /**
         * 这里先简单生产一匹马
         */
        System.out.println("一匹马出生~~~~~");
        Horse horse = new Horse();
        horse.setOwner("光明农场");
        return horse;
    }

    @Override
    public Plant newPlant() {
        System.out.println("种了一棵果树~~~~~~");
        Fruite fruite = new Fruite();
        fruite.setOwner("光明农场");
        return fruite;
    }
}